import request from '@/router/axios';

/**
 * @param data 新增枚举
 * */
export const addEnum = (data) => {
  return request({
    url: '/api/manager-api/mx-code-type/inset',
    method: 'post',
    data
  })
}

/**
 * @param data 新增枚举
 * */
export const updateEnum = (data) => {
  return request({
    url: '/api/manager-api/mx-code-type/update',
    method: 'post',
    data
  })
}

/**
 * @param params 查询枚举
 * */
export const getList = (params) => {
  return request({
    url: '/api/manager-api/mx-code-type/query',
    method: 'get',
    params
  })
}

/**
 * @param params 枚举详情
 * */
export const getEnumDetails = (params) => {
  return request({
    url: '/api/manager-api/mx-code-type/details',
    method: 'get',
    params
  })
}

/**
 * @param params 启用枚举
 * */
export const start = (params) => {
  return request({
    url: '/api/manager-api/mx-code-type/startUsing',
    method: 'get',
    params
  })
}

/**
 * @param params 停用枚举
 * */
export const stop = (params) => {
  return request({
    url: '/api/manager-api/mx-code-type/stopUsing',
    method: 'get',
    params
  })
}

/**
 * @param params 删除枚举
 * */
export const del = (params) => {
  return request({
    url: '/api/manager-api/mx-code-type/delete',
    method: 'get',
    params
  })
}
